package com.taobao.me.feignclient;

import com.taobao.base.model.RestResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 *远程调用搜索接口
 */
//使用fallback定义降级类是无法拿到熔断异常,使用FallbackFactory可以拿到熔断的异常信息
@FeignClient(value = "home-api",fallbackFactory = HomeServiceClientFallbackFactory.class)
public interface HomeServiceClient {

    /**
     * 减库存
     */
    @GetMapping("/home/goods/getGoodsCount/{list}")
    RestResponse<String> getGoodsCount(@PathVariable("list") List<Integer> goodsId);



}
